urllib.error.URLError urlopen error [Errno 11004] getaddrinfo failed

by: Maltesh, 8 years ago


I m new to python programming i tried the below code and i'm getting the eror

#Used to make requests
import urllib.request

x = urllib.request.urlopen('https://www.google.com/')
print(x.read())


urllib.error.URLError: <urlopen error [Errno 11004] getaddrinfo failed>

Help me out......!!




You must be logged in to post. Please login or register an account.



What happens when you try another website, like pythonprogramming.net?

-Harrison 8 years ago

You must be logged in to post. Please login or register an account.

Try this:

from urllib import *
url = 'https://www.google.com/'

print urlopen(url).read()


-alexdotis 8 years ago

You must be logged in to post. Please login or register an account.